<ion-header>
  <ion-navbar>
    <ion-title>钱包</ion-title>
    <ion-buttons end><button ion-button (click)="gotoPageAction(4)">交易记录</button></ion-buttons>
  </ion-navbar>
</ion-header>

<ion-content>
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content
      pullingText="下拉刷新"
      refreshingText="刷新中..."></ion-refresher-content>
  </ion-refresher>
  <div style="background: white">
    <div class="balance">
      <img *ngIf="!user.isGetCash" src="./assets/imgs/loading.gif" style="width: 30px;height: 30px;">
       <span *ngIf="user.isGetCash">￥{{user.cash}}</span>
    </div>
    <div class="transaction flex">
      <div class="item flex" (click)="gotoPageAction(1)">
        <img src="./assets/imgs/deposit.png">
        <p>存款</p>
      </div>
      <div class="item flex" (click)="gotoPageAction(2)">
        <img src="./assets/imgs/transaction.png">
        <p>转账</p>
      </div>
      <div class="item flex" (click)="gotoPageAction(3)">
        <img src="./assets/imgs/withdrawal.png">
        <p>取款</p>
      </div>
    </div>
  </div>
  <div class="flex gameHeader">
    <div class="line"></div>
    <div class="gameWallet">游戏钱包</div>
    <div class="line"></div>
  </div>
  <loading [text]="'加载中...'" *ngIf="showLoading"></loading>
  <div class="games flex">
    <div class="item" *ngFor="let item of user.platformsCash">
      <div class="block">
        <p class="name">{{item.name}}</p>
        <img *ngIf="item.isLoading" src="./assets/imgs/loading.gif">
        <p class="money" *ngIf="!item.isLoading">{{item.money.toFixed(2)}}</p>
      </div>
    </div>
  </div>
</ion-content>


